#include "Player.h"
#include "Unit.hpp"
Player::Player()
{
    m_id = -1;
    m_team = -1 ;
    m_color = 0 ;
    m_name = "Someone";
    m_isPlaying = false ;
    m_hero = NULL ;
}



Player::Player(short team, short color , std::string name )
{
    m_id = -1;
    m_team = team ;
    m_color = color ;
    m_name = name;
    m_isPlaying = false ;
    m_hero = NULL ;
}

sf::Color Player::getInsideColor() const
{
    sf::Color insidecolor ;
    switch(m_color)
    {
    case 0:
        insidecolor = sf::Color(0,206,209); // Light Blue
        break;
    case 1:
        insidecolor = sf::Color(128,255,0);
        break;
    case 2:
        insidecolor = sf::Color(255,128,0); //
        break;
    case 3:
        insidecolor = sf::Color(255,190,0); // Sandy Brown
        break;
    case 4:
        insidecolor = sf::Color(0,128,128); // Teal
        break;
    case 5:
        insidecolor = sf::Color::White;
        break;
    case 6:
        insidecolor = sf::Color(255,51,51);
        break;
    case 7:
        insidecolor = sf::Color(153,51,255);
        break;
    default:
        insidecolor = sf::Color(192,192,192); // Silver
        break;
    }
    return insidecolor ;
}

sf::Color Player::getOutsideColor() const
{
    sf::Color outsidecolor ;
    switch(m_color)
    {
    case 0:
        outsidecolor = sf::Color::Blue;
        break;
    case 1:
        outsidecolor = sf::Color(51,102,0);
        break;
    case 2:
        outsidecolor = sf::Color(255,0,0);
        break;
    case 3:
        outsidecolor = sf::Color(153,102,0); // Chocolate
        break;
    case 4:
        outsidecolor = sf::Color(47,79,79); // Dark Slate Grey
        break;
    case 5:
        outsidecolor = sf::Color(128,128,128); // Gray
        break;
    case 6:
        outsidecolor = sf::Color(153,0,0);
        break;
    case 7:
        outsidecolor = sf::Color(76,0,153);
        break;
    default:
        outsidecolor = sf::Color(165,42,42); // Brown
        break;
    }
    return outsidecolor ;
}


Player::~Player()
{
    //dtor
}
